const yapi = require('../yapi.js');
const baseController = require('./base.js');
const groupModel = require('../models/group.js');

class demoController extends baseController{
    constructor(ctx) {
        super(ctx);
    }
    async list(ctx) {
        return (ctx.body = yapi.commons.resReturn({
            message:'hello demo!!'
        }));
    }

    async groupList(ctx) {
        var groupInst = yapi.getInst(groupModel);
        let result = await groupInst.list();
        return (ctx.body = yapi.commons.resReturn(result));
    }
}

module.exports = demoController;
